@import '../../../index.scss';

.container {
  .navbar {
    // background-color: red;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 99;

    .capsule {
      // background-color: orange;
      position: relative;
      display: flex;
      align-items: center;
      width: 100%;

      .back {
        position: absolute;
        height: 40rpx;
        left: 20rpx;
        padding: 10rpx;
        // background-color: rgba($color: #000000, $alpha: .1);
        width: 40rpx;
        border-radius: 100%;
        filter: invert(100%);
      }

      .title {
        font-size: 34rpx;
        font-weight: bold;
        color: #fff;
        text-align: center;
        width: 100%;
      }
    }
  }

  .topic {
    border-bottom: 20rpx solid #eee;
    padding-bottom: 30rpx;

    .cover {
      height: 500rpx;
      width: 100%;
      background-color: #f8f8f8;

      image {
        width: 100%;
        height: 100%;
      }
    }

    .tips {
      display: flex;
      justify-content: center;
      padding: 30rpx;
      font-size: 26rpx;
      color: #999;

      .num {
        color: $primary-color;
        padding: 0 2rpx;
      }
    }

    .descript {
      padding: 0 30rpx;
      color: #000;
      font-size: 28rpx;
    }
  }

  .dynamic {
    padding: 0 30rpx;
    padding-bottom: 50rpx;

    .nav {
      display: flex;
      justify-content: space-between;
      padding: 30rpx 0;
      align-items: center;

      .title {
        font-size: 28rpx;
        color: $primary-color;
        font-weight: bold;
        border-bottom: 4rpx solid $primary-color;
        padding-bottom: 4rpx;
      }

      .sort {
        display: flex;
        font-size: 24rpx;

        view {
          margin-left: 20rpx;

          &.active {
            color: $primary-color;
          }
        }
      }
    }

    .box {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 30rpx;

      .item {
        .cover {
          width: 100%;
          height: 0;
          padding-bottom: 100%;
          position: relative;
          background-color: #f8f8f8;

          image {
            width: 100%;
            height: 100%;
            position: absolute;
            top: 0;
            left: 0;

            &.icon {
              width: 100%;
              height: 100%;
              background-color: #fff;
              opacity: .3;
              padding: 40%;
              filter: invert(100%);
              box-sizing: border-box;
            }
          }
        }

        .desc {
          padding: 10rpx;
          padding-bottom: 0;
          box-sizing: border-box;
          font-size: 24rpx;
          color: #666;
          display: -webkit-box;
          /* 必须与 line-clamp 一起使用 */
          -webkit-line-clamp: 2;
          /* 限制为两行 */
          -webkit-box-orient: vertical;
          /* 设置盒子方向为垂直 */
          overflow: hidden;
          /* 超出内容隐藏 */
        }

        .user {
          display: flex;
          align-items: center;
          padding: 10rpx;
          box-sizing: border-box;

          .avatar {
            width: 44rpx;
            height: 44rpx;
            border-radius: 100%;
            overflow: hidden;
            margin-right: 10rpx;
            background-color: #f8f8f8;

            image {
              width: 100%;
              height: 100%;
            }
          }

          .name {
            font-size: 24rpx;
            color: #999;
            flex: 1;
            display: -webkit-box;
            /* 必须与 line-clamp 一起使用 */
            -webkit-line-clamp: 1;
            /* 限制为两行 */
            -webkit-box-orient: vertical;
            /* 设置盒子方向为垂直 */
            overflow: hidden;
            /* 超出内容隐藏 */
          }
        }

        .zan {
          display: flex;
          align-items: center;

          .icon {
            height: 30rpx;
            filter: invert(60%);
            padding-right: 10rpx;
          }

          .num {
            font-size: 24rpx;
            color: #999;
          }
        }

      }
    }
  }
}